# Get the admin
getAdmin = function(thedate) {
  if (thedate < as.Date("1947-09-01")) {
    pres = "Roosevelt"
  } else if (thedate >= as.Date("1947-09-01") & thedate < as.Date("1953-01-21")) {
    pres = "Truman"
  } else if (thedate >= as.Date("1953-01-21") & thedate < as.Date("1961-01-21")) {
    pres = "Eisenhower"
  } else if (thedate >= as.Date("1961-01-21") & thedate < as.Date("1963-11-22")) {
    pres = "Kennedy"
  } else if (thedate >= as.Date("1963-11-22") & thedate < as.Date("1969-01-21")) {
    pres = "Johnson"
  } else if (thedate >= as.Date("1969-01-21") & thedate < as.Date("1973-10-10")) {
    pres = "Nixon"
  } else if (thedate >= as.Date("1973-10-10") & thedate < as.Date("1974-08-09")) {
    pres = "Nixon"
  } else if (thedate >= as.Date("1974-08-09") & thedate < as.Date("1977-01-20")) {
    pres = "Ford"
  } else if (thedate >= as.Date("1977-01-20") & thedate < as.Date("1981-01-20")) {
    pres = "Carter"
  } else if (thedate >= as.Date("1981-01-20") & thedate < as.Date("1989-01-20")) {
    pres = "Reagan"
  } else if (thedate >= as.Date("1989-01-20") & thedate < as.Date("1993-01-20")) {
    pres = "H.W. Bush"
  } else if (thedate >= as.Date("1993-01-20") & thedate < as.Date("2001-01-20")) {
    pres = "Clinton"
  } else if (thedate >= as.Date("2001-01-20") & thedate < as.Date("2009-01-20")) {
    pres = "W. Bush"
  } else if (thedate >= as.Date("2009-01-20") & thedate < as.Date("2017-01-20")) {
    pres = "Obama"
  } else {
    pres = "Trump"
  }
  return(pres)
}